package com.wd.visitor.common.job;

import com.wd.visitor.common.service.HearBeatService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @className: TokenScheduler
 * @description: TODO 类描述
 * @author: liumingkun
 * @date: 2024/11/3
 **/
@Component
public class TokenScheduler {


    @Resource
    HearBeatService hearBeatService;

    // 每隔 1 分钟获取一次 token
    @Scheduled(fixedDelay = 1000 * 10)
    public void scheduleTokenFetch() {
        hearBeatService.heartBeat();
    }

}